from abc import ABC, abstractmethod
from typing import Optional

from src.core.indicators.indicator import RequiresIndicators
from src.core.instruction.instruction import Instruction
from src.enums.timeframe import RequiresTimeframes


class StopLossManager(RequiresTimeframes, RequiresIndicators, ABC):
    def __init__(self):
        pass

    @abstractmethod
    def check_exit(self, pos, context) -> Optional[Instruction]:
        raise NotImplementedError
